package com.tiankong.product.event;

import com.tiankong.product.dto.SpuInfoDto;
import org.springframework.context.ApplicationEvent;

/**
 * @author: scl
 * @date: 2021-07-07 12:39
 * @description 商品优惠信息修改事件
 */
public class ProductCouponEvent extends ApplicationEvent {

    /**
     * Create a new {@code ApplicationEvent}.
     *
     * @param source the object on which the event initially occurred or with
     *               which the event is associated (never {@code null})
     */
    public ProductCouponEvent(SpuInfoDto source) {
        super(source);
    }

    public SpuInfoDto spuInfo(){
        return (SpuInfoDto) getSource();

    }
}
